<template>
	<div>
		<!--地址-->
		<view class="add-address d-s-c" @click="addAddress()" v-if="Address==null">
			<view class="icon-box mr10">
				<span class="icon iconfont icon-dizhi"></span>
			</view>
			<text>请添加收货地址</text>
		</view>
		
		<view class="address-defalut-wrap" @click="addAddress()" v-else>
			<view class="add-addr">
				<view>
					<i class="icon iconfont icon-dizhi"></i>
				</view>
				<view>
					<view class="user">
						<text class="name">{{Address.name}}</text>
						<text class="tel">{{Address.phone}}</text>
					</view>
					<view class="info">
						<text class="province-c-a">{{Address.region.province}} {{Address.region.city}} {{Address.region.region}}{{Address.detail}}</text>
					</view>
				</view>
			</view>
		</view>
		<view class="addree-bottom">
			<view class="stripe" v-for="(item,index) in 10" :key="index">
				<text :class="index%2==0?'red':'blue'"></text>
				<text class="white"></text>
			</view>
		</view>
		
	</div>
</template>

<script>
	export default{
		data(){
			return {
				
			}
		},
		props: ['Address','exist_address'],
		onLoad() {
		
		},
		mounted() {
		
		},
		methods:{
			/*添加地址*/
			addAddress(){
				let url = '/pages/user/address/address?source=order';
				if(!this.exist_address){
					url = '/pages/user/address/add/add?delta=1';
				}
				uni.navigateTo({
					url: url,
				});
			}
		}
	}
</script>

<style>
	.info{
		font-size: 33rpx;
		line-height: 43rpx;
	}
	.add-addr{
		display: flex;
		align-items: center;
	}
	.tel{
		font-size: 27rpx;
		color: #999999;
	}
	.choose-address{
		width: 88rpx;
		height: 88rpx;
		margin-right: 35rpx;
	}
	.icon-dizhi{
		margin-right: 25rpx;
		color: #ff6633;
		font-size: 60rpx;
	}
</style>

